package com.example.xsssglxt.mapper;

import com.example.xsssglxt.entity.Live;
import com.example.xsssglxt.entity.Louyu;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface LiveMapper {
    @Select("select * from ruzhu where studentname like concat ('%',#{studentname},'%') AND number like concat ('%',#{number},'%')  limit #{pageNum}, #{pageSize}")
    List<Live> selectpage(Integer pageNum, Integer pageSize, String studentname, String number);
    @Select("select count(*) from ruzhu where  studentname like concat ('%',#{studentname},'%') AND number like concat ('%',#{number},'%') ")
    Integer selecttotal(String studentname,String  number);
    @Select("select * from ruzhu")

    List<Live> selectlist();
    @Insert("insert into ruzhu(studentbh,studentname,number,livetime,studentid,susheid) VALUES(#{studentbh},#{studentname},#{number},#{livetime},#{studentid},#{susheid})")
    int insert(Live live);
    @Update("update ruzhu set studentbh=#{studentbh},studentname=#{studentname},number=#{number},livetime=#{livetime},studentid=#{studentid},susheid=#{susheid} where id=#{id}")
    int update(Live live);
    @Delete("delete from ruzhu where id=#{id}")
    int deleter(@Param("id") Integer id);
}
